﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ProtoBuf;

namespace Model.App
{
    public class ISMForm
    {
        public List<ISMFormField> fields { get; set; }

        public static ISMForm NewForm()
        {
            ISMForm form = new ISMForm()
            {
                fields = new List<ISMFormField>()
            };
            return form;
        }
    }
    [ProtoContract]
    public class ISMFormFilled
    {
        [ProtoMember(1)]
        public List<ISMFormFieldFill> filledFields { get; set; }
        public ISMFormFilled()
        {
            filledFields = new List<ISMFormFieldFill>();
        }
    }
    [ProtoContract]
    public class ISMFormFieldFill
    {
        [ProtoMember(1)]
        public ISMFormField field { get; set; }
        [ProtoMember(2)]
        public string value { get; set; }
    }
    [ProtoContract]
    public class ISMFormField
    {
        [ProtoMember(1)]
        public UInt64 ID { get; set; }
        [ProtoMember(2)]
        public string field_name { get; set; }
        [ProtoMember(3)]
        public ISMFormFieldType field_type { get; set; }
        [ProtoMember(4)]
        public string field_desc { get; set; }
    }
}
